<template>
    <div id="app">
        <el-container>
            <el-main>
           11111111111111111111
            </el-main>
        </el-container>
    </div>
</template>

<script>
    import menujs from '@/components/Menu/Menu'

    export default {
        name: 'landing-page',
        components: {},
        data() {
            return {
                isCollapse: true
            }
        },
        mounted() {

            var electron = require('electron')
            let fs = require("fs");
            let appPath = electron.remote.app.getAppPath();
            console.log(appPath)
            let strings = appPath.split("\\");
            let path = appPath.replace(strings[strings.length - 1], "config\\config.json");
            let init = {
                "appPath": appPath,
                "configPath": path,
                "generate": {
                    projects: []
                },
            }

            fs.access(path, fs.constants.F_OK, (err) => {
                if (err ? true : false === true) {
                    fs.mkdir(appPath.replace(strings[strings.length - 1], "config"), err1 => {
                        fs.writeFile(path, JSON.stringify(init, null, 4), 'utf8', (err) => {
                            console.log(err)
                        });
                    })

                }

            });
        },
        methods: {}
    }
</script>

<style>
    html, body, #app, .el-container {
        /*设置内部填充为0，几个布局元素之间没有间距*/
        padding: 0px;
        /*外部间距也是如此设置*/
        margin: 0px;
        /*统一设置高度为100%*/
        height: 100%;
    }

    .el-main {
        background-color: #E9EEF3;
        color: #333;
        text-align: center;
        line-height: 160px;
    }

    body > .el-container {
        margin-bottom: 40px;
    }

    .el-container:nth-child(5) .el-aside,
    .el-container:nth-child(6) .el-aside {
        line-height: 260px;
    }

    .el-container:nth-child(7) .el-aside {
        line-height: 320px;
    }
</style>
